home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8389 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1013 b   |  32 lines

  1. Path: lrz-muenchen.de!news
  2. From: ua302aa@lrz-muenchen.de ()
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: strcpy problem
  5. Date: 17 Feb 1996 17:41:10 GMT
  6. Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
  7. Distribution: world
  8. Message-ID: <4g53vm$4c5@sparcserver.lrz-muenchen.de>
  9. References: <31261C92.3DEE@intersurf.com>
  10. NNTP-Posting-Host: sun2.lrz-muenchen.de
  11.  
  12. "David C. Branton" <dbranton@intersurf.com> writes:
  13.  
  14. >The line strcpy... does not copy the string. When code is traced, there 
  15. >is a proper value for playername but nothing gets copied into the nested 
  16. >structure.  All variable have been properly declared and have values at 
  17. >this point.
  18.  
  19. >Any ideas as to why strcpy does not work in this case?
  20.  
  21. Maybe because the semantics of strcpy() are 
  22.  
  23.    char *strcpy(char *destination, const char *source);
  24.  
  25. and "source" is copied to "destination", not the other way round.
  26.  
  27. Kurt
  28. --
  29. | Kurt Watzka                             Phone : +49-89-2180-6254
  30. | watzka@stat.uni-muenchen.de
  31. | ua302aa@sunmail.lrz-muenchen.de
  32.